home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / tip / ts-shead.tip < prev    next >
Text File  |  1993-09-15  |  3KB  |  84 lines

  1. % This macro source file is from the four volume series
  2. % "TeX in Practice" by Stephan von Bechtolsheim, published
  3. % 1993 by Springer-Verlag, New York.
  4. % Copyright 1993 Stephan von Bechtolsheim.
  5. % No warranty or liability is assumed.
  6. % This macro may be copied freely if no fees other than
  7. % media cost or shipping charges are charged and as long
  8. % as this copyright and the following source code itself
  9. % is not changed. Please see the series for further information.
  10. %
  11. % Version: 1.0
  12. % Date: May 1, 1993
  13. %
  14. %
  15. % This source code is documented in 31.2.9, p. III-604.
  16. % Original source in file "pp2.TEX", starting line 940.
  17. \wlog{L: "ts-shead.tip" ["pp2.TEX," l. 940, p. III-604]}%
  18. % This file DOES belong to format "texip."
  19. \InputD{genhead.tip}
  20. \InputD{compst.tip}
  21. \InputD{dblarg.tip}
  22. \catcode`\@ = 11
  23. \NewCounter{SectionNo}{\arabic}% 
  24.     {\PrintCounter{ChapterNo}.\TheCounter{SectionNo}}%
  25.     {\PrintCounter{ChapterNo}.\TheCounter{SectionNo}}%
  26. \NewCounter{SubSectionNo}{\arabic}%
  27.     {\PrintCounter{SectionNo}.\TheCounter{SubSectionNo}}%
  28.     {\PrintCounter{SectionNo}.\TheCounter{SubSectionNo}}%
  29. \NewCounter{SubSubSectionNo}{\arabic}%
  30.     {\PrintCounter{SubSectionNo}.\TheCounter{SubSubSectionNo}}%
  31.     {\PrintCounter{SubSectionNo}.\TheCounter{SubSubSectionNo}}%
  32. \NewCounter{CloseByReferenceCount}{\arabic}%
  33.     {\PrintCounter{CloseByReferenceCount}}%
  34.     {\PrintCounter{CloseByReferenceCount}}%
  35. \AddCounterToResetList{SectionNo}{ChapterNo}%
  36. \AddCounterToResetList{SubSectionNo}{SectionNo}%
  37. \AddCounterToResetList{SubSubSectionNo}{SubSectionNo}%
  38. \def\Section{\DblArg{\@Section}}%
  39. \def\@Section [#1]#2{% 
  40.     \StepCounter{SectionNo}%
  41.     \def\Label ##1{\@Label{##1}{\RefCounter{SectionNo}}{1}}%
  42.     \GenericHeading{2}{36pt plus 10pt minus 2pt}% 
  43.         {1}{1}{1}{24pt}{0}%
  44.         {\Large\baselineskip = 15pt}{-13pt}% 
  45.         {\PrintCounter{SectionNo}}{#2}{#1}% 
  46.     \gdef\EveryParB{%
  47.         {%
  48.             \@MakeRobustMacros
  49.             \def\LineBreakToc{ }%
  50.             \def\LineBreakHeading{ }%
  51.             \def\IgnoreInRunningHead ####1{%
  52.                 \relax$\ldots$%
  53.             }%
  54.             \mark{#2}%
  55.         }%
  56.     }%
  57. }
  58. \def\SubSection{\DblArg{\@SubSection}}%
  59. \def\@SubSection [#1]#2{% 
  60.     \StepCounter{SubSectionNo}%
  61.     \def\Label ##1{\@Label{##1}{\RefCounter{SubSectionNo}}{1}}%
  62.     \GenericHeading{3}{30pt plus 8pt minus 2pt}% 
  63.         {1}{1}{1}{18pt}{0}% 
  64.         {\large\baselineskip = 14pt}{-12pt}% 
  65.         {\PrintCounter{SubSectionNo}}{#2}{#1}% 
  66. }
  67. \def\SubSubSection{\DblArg{\@SubSubSection}}%
  68. \def\@SubSubSection [#1]#2{% 
  69.     \ifnum\TheCounter{SubSectionNo} = 0
  70.         \errhelp = {The reason is probably that \string\Section
  71.             occurred directly followed by \string\SubSubSection
  72.             (that is you forgot a \string\SubSection in between).}%
  73.         \errmessage{\string\@SubSubSection: Counter "SubSectionNo"
  74.             is zero.}%
  75.     \fi
  76.     \StepCounter{SubSubSectionNo}%
  77.     \def\Label ##1{\@Label{##1}{\RefCounter{SubSubSectionNo}}{1}}%
  78.     \GenericHeading{4}{24pt plus 6pt minus 1pt}% 
  79.         {1}{1}{1}{18pt}{0}% 
  80.         {\normalsize}{-10pt}% 
  81.         {\PrintCounter{SubSubSectionNo}}{#2}{#1}%
  82. }
  83. \catcode`\@ = 12
  84.